const db = require("../db/mysql");
const searchStubyPageSql= "select * from ev_user id limit ?,?";
const searchStuCount = "select count(*) from ev_user"
exports.getList = (req,res)=>{
    let pn = req.body.pageNum*1;
    let ps = req.body.pageSize*1;
    db.query(searchStuCount,(err,count)=>{
        var total = count[0]["count(*)"]
        db.query(searchStubyPageSql,[(pn-1)*ps,ps],(err,result)=>{
            if (err) {
                return res.cc(err)
            }
            // 执行成功
            return res.send({
                status:0,
                message:"获取用户列表成功！",
                data:{
                    result,
                    total
                },
            })
        })
    })
}